package cn.zy.amyan.server.handler;

import cn.zy.amyan.core.base.RequestData;
import cn.zy.amyan.core.codec.AyDecode;
import cn.zy.amyan.core.codec.AyEncode;
import io.netty.channel.ChannelInitializer;
import io.netty.channel.socket.SocketChannel;

/**
 * @author 子言
 * @date 2024/5/5 下午 16:34
 */
public class ServerInitializer extends ChannelInitializer<SocketChannel> {
	@Override
	protected void initChannel(SocketChannel ch) throws Exception {
		ch.pipeline()
				.addLast(new AyDecode(RequestData.class))
				.addLast(new AyEncode())
				.addLast(new ServerHandler());
	}
}

